<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
<div id="app-5">
   <t1
       v-for="item in list"
       v-bind:x='item'
       b-bind:key="item.id"
   >
   </t1>
</div>
</body>
</html>
<script>
    Vue.component('t1', {
        props: ['item','x'],
        template: "<div>{{x.text}}</div>\n"
    });

    var app=new Vue({
        el:'#app-5',
        data:{
            list: [
                { id: 0, text: '蔬菜' },
                { id: 1, text: '奶酪' },
                { id: 2, text: '随便其它什么人吃的东西' }
            ]
        },
        created:function () {
            console.log('9090');
        }
    });
    /**
     * 运行流程
     * 1. 绑定元素id
     * 2. new Vue
     * 3. el绑定app
     * 4. data赋值
     */
</script>